package com.woniu.product.client;

import com.woniu.model.Result;
import com.woniu.product.client.model.Coach;
import com.woniu.product.client.model.GetVenueCoachFrom;
import com.woniu.product.client.model.VenueAdminDto;
import com.woniu.product.client.model.VenueInfo;
import com.woniu.product.dto.venueCoach.VenueCoachDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

@FeignClient(name = "account-server",path = "/account")
public interface AccountClient {

    /**
     * 根据id查找教练信息
     *
     * @param id:教练id
     * @return 对象
     *
     */
    @GetMapping("/coach/byId/{id}")
    @ApiOperation("根据id查找教练信息")
    Result<Coach> byId(@PathVariable("id") Integer id);

    @LoadBalanced
    @GetMapping("/venueAdmin/byId/{id}")
    @ApiOperation("根据id查找教练信息")
    Result<VenueAdminDto> getVenueCoachBtId(@PathVariable("id") Integer id);

    @LoadBalanced
    @PostMapping("/venueAdmin/byIds")
    @ApiOperation("根据ids查找教练信息")
    Result<List<VenueCoachDto>> getVenueCoachBtIds(@RequestBody GetVenueCoachFrom from);

}
